package com.simple.datax.db.mybatis.model;

import java.io.Serializable;
import java.util.Date;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 
 * @author paladin
 *
 */
public class DataxParseRawMsg implements Serializable {
    private String recvRawMsgid;

    private String messageid;

    private String backupFileName;

    private String msgType;

    private Short msgSubType;

    private String msgBusiType;

    private String senderid;

    private String receiverid;

    private Date backupTime;

    private Long dataSize;

    private Short status;

    private byte[] msgData;

    private static final long serialVersionUID = 1L;

    public String getRecvRawMsgid() {
        return recvRawMsgid;
    }

    public void setRecvRawMsgid(String recvRawMsgid) {
        this.recvRawMsgid = recvRawMsgid == null ? null : recvRawMsgid.trim();
    }

    public String getMessageid() {
        return messageid;
    }

    public void setMessageid(String messageid) {
        this.messageid = messageid == null ? null : messageid.trim();
    }

    public String getBackupFileName() {
        return backupFileName;
    }

    public void setBackupFileName(String backupFileName) {
        this.backupFileName = backupFileName == null ? null : backupFileName.trim();
    }

    public String getMsgType() {
        return msgType;
    }

    public void setMsgType(String msgType) {
        this.msgType = msgType == null ? null : msgType.trim();
    }

    public Short getMsgSubType() {
        return msgSubType;
    }

    public void setMsgSubType(Short msgSubType) {
        this.msgSubType = msgSubType;
    }

    public String getMsgBusiType() {
        return msgBusiType;
    }

    public void setMsgBusiType(String msgBusiType) {
        this.msgBusiType = msgBusiType == null ? null : msgBusiType.trim();
    }

    public String getSenderid() {
        return senderid;
    }

    public void setSenderid(String senderid) {
        this.senderid = senderid == null ? null : senderid.trim();
    }

    public String getReceiverid() {
        return receiverid;
    }

    public void setReceiverid(String receiverid) {
        this.receiverid = receiverid == null ? null : receiverid.trim();
    }

    public Date getBackupTime() {
        return backupTime;
    }

    public void setBackupTime(Date backupTime) {
        this.backupTime = backupTime;
    }

    public Long getDataSize() {
        return dataSize;
    }

    public void setDataSize(Long dataSize) {
        this.dataSize = dataSize;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public byte[] getMsgData() {
        return msgData;
    }

    public void setMsgData(byte[] msgData) {
        this.msgData = msgData;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DataxParseRawMsg other = (DataxParseRawMsg) that;
        return (this.getRecvRawMsgid() == null ? other.getRecvRawMsgid() == null : this.getRecvRawMsgid().equals(other.getRecvRawMsgid()))
            && (this.getMessageid() == null ? other.getMessageid() == null : this.getMessageid().equals(other.getMessageid()))
            && (this.getBackupFileName() == null ? other.getBackupFileName() == null : this.getBackupFileName().equals(other.getBackupFileName()))
            && (this.getMsgType() == null ? other.getMsgType() == null : this.getMsgType().equals(other.getMsgType()))
            && (this.getMsgSubType() == null ? other.getMsgSubType() == null : this.getMsgSubType().equals(other.getMsgSubType()))
            && (this.getMsgBusiType() == null ? other.getMsgBusiType() == null : this.getMsgBusiType().equals(other.getMsgBusiType()))
            && (this.getSenderid() == null ? other.getSenderid() == null : this.getSenderid().equals(other.getSenderid()))
            && (this.getReceiverid() == null ? other.getReceiverid() == null : this.getReceiverid().equals(other.getReceiverid()))
            && (this.getBackupTime() == null ? other.getBackupTime() == null : this.getBackupTime().equals(other.getBackupTime()))
            && (this.getDataSize() == null ? other.getDataSize() == null : this.getDataSize().equals(other.getDataSize()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getMsgData() == null ? other.getMsgData() == null : this.getMsgData().equals(other.getMsgData()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRecvRawMsgid() == null) ? 0 : getRecvRawMsgid().hashCode());
        result = prime * result + ((getMessageid() == null) ? 0 : getMessageid().hashCode());
        result = prime * result + ((getBackupFileName() == null) ? 0 : getBackupFileName().hashCode());
        result = prime * result + ((getMsgType() == null) ? 0 : getMsgType().hashCode());
        result = prime * result + ((getMsgSubType() == null) ? 0 : getMsgSubType().hashCode());
        result = prime * result + ((getMsgBusiType() == null) ? 0 : getMsgBusiType().hashCode());
        result = prime * result + ((getSenderid() == null) ? 0 : getSenderid().hashCode());
        result = prime * result + ((getReceiverid() == null) ? 0 : getReceiverid().hashCode());
        result = prime * result + ((getBackupTime() == null) ? 0 : getBackupTime().hashCode());
        result = prime * result + ((getDataSize() == null) ? 0 : getDataSize().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getMsgData() == null) ? 0 : getMsgData().hashCode());
        return result;
    }
    
    public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}
}